<template>
  <div class="backContainer">
    <label class="commonBack previous" @click="previous">
        <a-icon type="left" :style="{color:'white'}"/>
    </label>
    <label class="commonBack next" @click="next">
        <a-icon type="right" :style="{color:'white'}" />
    </label>
  </div>
</template>

<script>
export default {
  name: "Back",
  methods:{
    previous(){
      // console.log("previous")
      // console.log('跳转钱',this.$router)
      // console.log(this.$router.go(-1))
      // console.log('跳转后',this.$router)
      // console.log(this.$router.history.current.path.endsWith('.html'))
      if (this.$router.history.current.path.endsWith('.html')){
        console.log(this.$router.go(0))
        // this.$router.push("/findMusic")
      }else {
        this.$router.go(-1)
      }
    },
    next(){
      console.log("next")
      this.$router.go(1)
      console.log(this.$router)
    }
  }
}
</script>

<style scoped>
.backContainer{
  height: 2.4rem;
  padding: 0.45rem 0;
}
.commonBack{
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background-color: #e80000;
  border-radius: 50%;
  padding: 0.2rem;
  cursor: pointer;
}
.previous{
  margin: 0 0.2rem 0 0 ;
}
.next{
  margin: 0 0 0 0.2rem  ;
}
</style>
